-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore UNIQUE_CHECKS mysql variable to its original value when done … #32286
Restore UNIQUE_CHECKS mysql variable to its original value when done … #32286
Conversation
Hi @hostep. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
…with changing the database structure. This prevents potentially inserting duplicated values while manipulating data in the setup:upgrade command.
a25c2c8
to
2979876
Compare
@magento run all tests |
Hi @ihor-sviziev, thank you for the review.
|
@magento run Static Tests |
@sivaschenko @sidolov @gabrieldagama, it seems like p1 priority should be set for this issue. What do you think? Note: it would be great to coved this PR with some integration/setup-integration test, but not sure if it will be easy |
Milestone set to 2.5 as this change is backwards incompatible. Is it possible to cover the issue with integration tests (i.e. adding a test module trying to install duplicated data)? |
@hostep approval is in progress |
I moved back to "to approve" status. |
Hi folks, asking again after 2 months. PR has prio 1, still no movement, any idea what's blocking this and can I help out somehow? |
@gabrieldagama @sivaschenko @sidolov could you help with it? |
Any update regarding this PR? We have now more and more clients coming with upgrade requests and I think this should be fixed asap. |
@kandy maybe you can move forward approval for such important fix? |
Unfortunately, I'm not part of the Community Engineering team. I think the best person to ping is @sidolov. |
Hi @Den4ik, thank you for the review. |
Hi @hostep, thank you for your contribution! |
Finally, it got merged! 🎉 |
…with changing the database structure. This prevents potentially inserting duplicated values while manipulating data in the setup:upgrade command.
Description (*)
See #32283
When approved, please please please consider backporting this to Magento 2.3.7, this is too important to be ignored for 2.3 in my opinion.
According to Magento core devs I spoke to on Slack in the past few days, there is an underlying problem where connections should be closed and opened again between the schema manipulation and the data manipulation in order to reset these mysql variables. But that's not happening.
So this is only a workaround, but since the same workaround was implemented for the
FOREIGN_KEY_CHECKS
and others, it makes sense to also do this forUNIQUE_CHECKS
until the root cause is found, since it's an easy fix which should not cause issues.I have no intention to write automated tests for this change, I already spend more then 10 hours on dealing with the consequences of this issue and then an hour on finding an appropriate solution, I can't invest more time in adding automated tests, sorry!
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
UNIQUE_CHECKS
variable, the RecurringData script makes it easy to test. For example, in the Magento\SalesSequence\Setup\RecurringData::install method, add:bin/magento setup:upgrade
Before this PR, it outputs:
After this PR, it outputs:
Questions or comments
Contribution checklist (*)